<?php
//解决手机端的问题
class MarketController extends NodeController
{
    static $service;
    //服务评价
    public function rating ()
    {
        if (empty($this->_user_global)) {
            $this->warning("请先登录");
            exit();
        }
       
        $this->view()->display("file:rating/market.tpl");
    }
    //提交评论
    public function sub ()
    {
        $rs = self::getService()->add($_POST, $this->_user_global['uid']);
        echo $rs['message'];
    }
    public function getService ()
    {
        if (self::$service == null) {
            self::$service = new MarketService();
        }
        return self::$service;
    }
}